1. Field of the Invention
The field of the invention is that of graphical libraries providing graphical functions used for the drawing of symbologic images. One of the fields of favored application is the generation of symbologic images for the piloting of aircraft. These images are in particular used for navigation, piloting and management of critical systems, such as engine checks.
2. Description of the Prior Art
Graphical images are generated on matrix screens, such as, for example, liquid crystal displays. The generation of the graphical image is done in the following manner: a buffer-memory called a “frame-buffer” is filled with the various symbologies necessary for the image, these symbologies being assigned an order of priority; when all the symbologies have been created in the buffer-memory, its content is then dispatched to the display. These graphical images are generated in real time.
Any linear graphical symbol can be decomposed into oriented elementary segments also called vectors. When generating a vector V of a certain thickness of a first initial color on a background of a second initial color, if the color of the pixels P is either the color of the vector V or the color of the background F, one obtains, as indicated in FIG. 1 which represents a part of the display, staircasing due to pixellation. The pixels of the vector V are represented in gray in this figure. Even if the resolution of the screen is significant, this staircasing is seen by the user and constitutes a visual hindrance.
To attenuate this visual effect, a procedure known as “antialiasing” is used. One also speaks of “antialiased” vectors to designate vectors having undergone “antialiasing”. It consists in mixing for the pixels situated at the boundaries of the vector the color of the vector with the color of the background by applying a mixing law, function of a transparency law dependent on a transparency coefficient A and initial colors of the vector and of the background.
The value of the coefficient A depends on the distance d of the pixel P with respect to the central axis O of the vector as indicated in FIG. 2 where the theoretical limits of the vector are depicted dashed. This coefficient is maximal at the center and equals AMAX and decreases progressively and symmetrically towards zero on moving away from the central axis of said vector. By way of example, FIG. 3 represents the variations of the coefficient A as a function of the distance d from the central axis of the vector. Generally, the mathematical function representing A is a Gaussian. The transparency coefficient of a given pixel P is denoted AS.
The color of a pixel is conventionally represented by a triple of calorimetric components. Typically, this triple comprises a red component RD, a green component GD and a blue component BD. In this case RF, GF and BF denote the calorimetric components of the initial color of the background and RS, GS and BS the colorimetric components of the initial color of the vector.
A possible mixing law making it possible to determine the colorimetric components RD, GD and BD of the pixel is then:
            R      D        =                  (                                            A              S                                      A              MAX                                ·                      R            S                          )            +              (                                                            A                MAX                            -                              A                S                                                    A              MAX                                ·                      R            F                          )                        G      D        =                  (                                            A              S                                      A              MAX                                ·                      G            S                          )            +              (                                                            A                MAX                            -                              A                S                                                    A              MAX                                ·                      G            F                          )                        B      D        =                  (                                            A              S                                      A              MAX                                ·                      B            S                          )            +              (                                                            A                MAX                            -                              A                S                                                    A              MAX                                ·                      B            F                          )            
By way of example, FIG. 4 shows the variation of the component RD as a function of the distance d from the central axis of the vector. The dashed vertical limits correspond to the limits of application of the mixing law LM. The calorimetric components GD and BD have much the same shape. After application of the mixing law to the pixels, a depiction of the type of that of FIG. 5 is obtained, which represents a vector part V “antialiased” on a background F. The pixels PS belonging to the core of the vector have the initial color of the vector, black in FIG. 5, the pixels PF situated far away from the vector have the color of the background, white in FIG. 5, the pixels PB situated at the boundary of the vector and of the background have intermediate colors between that of the vector and that of the background, represented by gray hues in FIG. 5.
The “antialiasing” makes it possible to attenuate the defects related to pixellation. However, when the vector and the background have very much the same or identical colors, the vector disappears on the background through lack of contrast. For certain applications, the colors are normalized and it is consequently impossible to change the color of the vector to regain the contrast. In this case, the solution implemented consists in surrounding the vector with a dark contour so as to depict the vector on the background whatever their respective colors. This technique is called “haloing”. FIG. 6 illustrates this principle where a part of the vector having undergone the “haloing” is represented. A vector V of identical color to the background is surrounded by a dark contour also called a halo H. The vector appears on the background F by virtue of this halo. To generate this contour, the principle generally applied consists in drawing a first “antialiased” vector of black color then a second likewise “antialiased” of the desired color, of lower thickness, of identical length and identical orientation to the first, the colors of the pixels of the second vector replacing in the buffer-memory the black color of the pixels of the first vector. Thus, ultimately, one obtains the second vector surrounded by a dark contour due to the first thicker black vector.
This method of graphical generation of a colored vector surrounded by a dark contour has several drawbacks detailed below:                the color of the pixels of the core of the vector is modified twice in the buffer-memory, a first time to generate the black vector and a second time to generate the vector of the desired color. But, the symbologies are generated in real time usually with complex graphics. It is therefore important to limit for each pixel, the unnecessary changes of color in the buffer-memory, which are expensive in terms of calculation and addressing time;        functionally, it is necessary to generate two different vectors with different drawing parameters while preserving the same graphical coordinates;        graphically, when two lines with halo cross, it is necessary to impose a logic of ordering of the drawings, differing according to the visual effect desired. If one of the two vectors is required to pass above the other, it is necessary firstly to draw the black part of the vector underneath, then the colored part of the same vector, then the black part of the vector on top, then the colored part of the vector on top. If, conversely, the two vectors are required to merge, it is necessary to draw the black part of the first vector, the black part of the second vector, the colored part of the first vector and finally, the colored part of the second vector.        